import { apiGet, apiPost } from "@/request";

/** login返回的结果 */
interface LoginResult {
	code: number;
	msg: string;
	data: string;
}

/**
 * @description: login
 * @param {string} url
 * @Date: 2023-03-25 03:07:54
 * @Author: mulingyuer
 */
interface LoginType {
	resp: string;
	user: string;
	pw: string;
	persist?: number;
	login_code?: string;
}
export function login(options: LoginType) {
	return apiPost<LoginResult>({
		url: `/admin/account.php?action=dosignin&resp=json`,
		method: "post",
		data: options
	});
}
